package io.kiki.sba.registry.server.metadata.slot.util.selector;

import io.kiki.sba.registry.server.metadata.slot.util.builder.SlotsBuilder;
import io.kiki.sba.registry.server.metadata.slot.util.comparator.Comparators;

class LeastLeaderFirstSelector extends AbstractDataServerSelector {

    private final Comparators.AbstractDataStoreNodeComparator dataStoreNodeComparator;

    public LeastLeaderFirstSelector(SlotsBuilder slotsBuilder) {
        super(slotsBuilder);
        this.dataStoreNodeComparator = Comparators.leastLeadersFirst(slotsBuilder);
    }

    @Override
    protected Comparators.AbstractDataStoreNodeComparator getDataStoreNodeComparator() {
        return dataStoreNodeComparator;
    }
}
